import React from 'react'
import {Image,Typography} from 'antd'


export const ProductImage = ({imageSrc,id,price,size,title,history,location,match}) =>{
    return (
        <div >
          
            {
               
                    size == 'large' ?(
                        <Image width={490} height={285} src={imageSrc}></Image>
                    ) :(
                        <Image width={240} height={120} src= {imageSrc}></Image>
                    )
                   
                
            }

            <div>
                <Typography.Text type='secondary'>
                    {title.slice(0,25)}
                </Typography.Text>
                <Typography.Text type='danger'>
                     ￥ {price} 起
                </Typography.Text>
            </div>
        </div>
    )
}